package cn.tom.dao;

import cn.tom.entity.Usr;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
    Usr findByAccount(String str);
    Usr findByEmail(String str);

    Usr findById(Integer num);

    List<Usr> findAll(Map<String, Object> map);

    int getCount();

    void add(Usr usr);

    int update(Usr usr);

    int updatePwd(@Param("uid") int i, @Param("newPwd") String str);

    int updateImg(@Param("uid") int i, @Param("uuid") String str);

    List<Usr> findPageUsr(@Param("start") Integer num, @Param("lines") Integer num2);

    int  freeze(@Param("closed") int closed,@Param("uid") Integer uid);

    int reset(@Param("uid") int uid);
}
